<?php
/*
 * @Creator: 小傲
 * @Date: 2023-04-07 14:41:03
 */
namespace app\admin\validate;

use think\Validate;

class Corporate extends Validate
{
    protected $rule =   [
        'corporate_image'  => 'require',   
        'name' => 'require',	
        'introduce' => 'require',	
        'phone' => 'require|max:11',	
        'url' => 'require'
    ];
    
    protected $message  =   [
        'corporate_image.require' => '企业图片不能为空',
        'name.require' => '企业名称不能为空',
		'introduce.require' => '企业介绍不能为空',
		'phone.require' => '联系电话不能为空',
        'phone.max' => '联系电话不能超过十一位',
		'url.require' => '合作企业网站路径不能为空',
    ];  
    protected $scene = [
        'add'  =>  ['corporate_image','name','introduce','phone','url'],
        'edit'  =>  ['corporate_image','name','introduce','phone','url'],
    ];
}